package dao

import (
	"fmt"
	"gorm.io/gorm"
	"gowork/microSignalSMSSending/model"
)

type AdviserDaoImf struct {

}

func (adviserDaoImf *AdviserDaoImf) GetAccountIsLeader(account string, tx *gorm.DB) (bool, error){

	var adviser model.Adviser
	err := tx.Where("account = ?", account).First(&adviser).Error
	fmt.Println("err：", err)
	if err != nil {
		return false, err
	}

	return adviser.GroupLeader, nil
}
